<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jsonDOM</title>
<link href="../hc.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../hc.js"></script>
<style type="text/css">
<!--
.rss
	{
	margin: 24px;
	padding:4px;
	}
-->
</style>
</head>

<body>
<div style='margin:8px;background: url(/icos/icolexp.gif) no-repeat scroll 0 -32px;width:16px;height:16px;' onmouseover='this.style.backgroundPosition="0 -48px";' onmouseout='this.style.backgroundPosition="0 -32px";'></div>
</body>
<script type="text/javascript">
//<![CDATA[

var xmld=xml$('../demo/demo.rss');
var orss=jsonDOM$(xmld,1);

var orz = el$( 'div' ).before$().class$( 'rss' );
var cn = orss.rss.channel;
var dcn = el$( 'div' ).appendTo$( orz ).class$( 'chnl' );
var lgo = el$( 'div' ).appendTo$( dcn ).class$( 'logo' );
var amg = el$( 'a' ).appendTo$( lgo );
amg.href = cn.image ? cn.image.link : '#';
var lmg = el$( 'img' ).appendTo$( amg );
lmg.src = './motif/peru.jpg';
lmg.alt = amg.title = cn.image.title;

var des = el$( 'div' ).after$( lgo ).class$( 'desc' );
var dest = el$( 'div' ).appendTo$( des );
dest.innerHTML = cn.title;

var cate = osort$(cn.item, 'category');

var itms = el$( 'div' ).after$( dcn );
for ( var i=0, L=cn.item.length; i<L; i++ )
{
	var ci = cn.item[i];
	var idv = el$( 'div' ).appendTo$( itms ).class$( 'item' );
	var idi = el$( 'div' ).appendTo$( idv ).class$( 'ili' );
	var ida = el$( 'a' ).appendTo$( idi );
	ida.href = ci.link;
	ida.title = ci.title;
	var idt = el$( 'span' ).appendTo$( ida );
	idt.innerHTML = ci.description;
}
//]]>
</script>
</html>